package com.chenfan.mcn.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author chenguopeng
 * @Date 2021/6/7 16:34
 */
@AllArgsConstructor
@Getter
public enum AeQuarterlyTypeEnum {

	/**
	 * 季度提成单状态
	 */
	NEW_CONTRACT(0, "新建"),

	// YFS_CONTRACT(1, "已发送"),

	// YQR_CONTRACT(2, "已确认"),

	YFF_CONTRACT(3, "已发放"),

	YZF_CONTRACT(9, "已作废"),
	;

	private final int code;
	private final String value;


	public static boolean checkIsExist(Integer code) {
		for (AeQuarterlyTypeEnum aeQuarterlyTypeEnum : AeQuarterlyTypeEnum.values()) {
			if (aeQuarterlyTypeEnum.code == code) {
				return true;
			}
		}
		return false;
	}

	public static AeQuarterlyTypeEnum getAeQuarterlyTypeEnum(Integer code) {
		for (AeQuarterlyTypeEnum aeQuarterlyTypeEnum : AeQuarterlyTypeEnum.values()) {
			if (aeQuarterlyTypeEnum.code == code) {
				return aeQuarterlyTypeEnum;
			}
		}
		return null;
	}

}
